import org.jsoup.Jsoup;

import javax.swing.*;
import java.io.IOException;

public class Dicts {
    public static void main(String[] args) throws IOException {
        String w = JOptionPane.showInputDialog("请输入词汇：");
        // System.out.println(w);
        //http://youdao.com/w/eng/boot/#keyfrom=dict2.index
        String u = "http://youdao.com/w/eng/" + w + "/#keyfrom=dict2.index";
        //System.out.println(u);
        String o = Jsoup.connect(u).get().select("div[class=trans-container]").get(0).text();
        System.out.println(o);
        JOptionPane.showMessageDialog(null,o);
    }


}
